package org.metasketch.editor.toolbox;

import org.metasketch.model.CommonIdentified;
import org.metasketch.reflection.RefUtil;

public abstract class BaseRelation {

	Class childType;
	Class parentType;

	public BaseRelation() {

	}

	public BaseRelation(Class childType, Class parentType) {
		this.childType = childType;
		this.parentType = parentType;

	}

	public abstract boolean isCompatible(Class argChildType, Class argParentType);

	public Class getChildType() {
		return childType;
	}

	public void setChildType(Class childType) {
		this.childType = childType;
	}

	public Class getParentType() {
		return parentType;
	}

	public void setParentType(Class parentType) {
		this.parentType = parentType;
	}

	public abstract void setup(CommonIdentified semantic,
			CommonIdentified parentSemantic) throws Throwable;

}
